package pojo;
// Generated 16-giu-2013 19.52.47 by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Personal generated by hbm2java
 */
@Entity
@Table(name="personal"
    ,catalog="mydb"
)
public class Personal  implements java.io.Serializable {


     private Integer idpersonal;
     private User user;
     private String name;
     private Date dateOfBirth;
     private String street;
     private String city;
     private String state;
     private String zip;

    public Personal() {
    }

	
    public Personal(User user) {
        this.user = user;
    }
    public Personal(User user, String name, Date dateOfBirth, String street, String city, String state, String zip) {
       this.user = user;
       this.name = name;
       this.dateOfBirth = dateOfBirth;
       this.street = street;
       this.city = city;
       this.state = state;
       this.zip = zip;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="idpersonal", unique=true, nullable=false)
    public Integer getIdpersonal() {
        return this.idpersonal;
    }
    
    public void setIdpersonal(Integer idpersonal) {
        this.idpersonal = idpersonal;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="user_iduser", nullable=false)
    public User getUser() {
        return this.user;
    }
    
    public void setUser(User user) {
        this.user = user;
    }
    
    @Column(name="name", length=45)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="date_of_birth", length=19)
    public Date getDateOfBirth() {
        return this.dateOfBirth;
    }
    
    public void setDateOfBirth(Date dateOfBirth) {
        this.dateOfBirth = dateOfBirth;
    }
    
    @Column(name="street", length=80)
    public String getStreet() {
        return this.street;
    }
    
    public void setStreet(String street) {
        this.street = street;
    }
    
    @Column(name="city", length=45)
    public String getCity() {
        return this.city;
    }
    
    public void setCity(String city) {
        this.city = city;
    }
    
    @Column(name="state", length=45)
    public String getState() {
        return this.state;
    }
    
    public void setState(String state) {
        this.state = state;
    }
    
    @Column(name="zip", length=10)
    public String getZip() {
        return this.zip;
    }
    
    public void setZip(String zip) {
        this.zip = zip;
    }




}


